package com.dubbo.example.dubboclient.Controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.dubbo.example.dubboapi.entity.AccountInfo;
import com.dubbo.example.dubboapi.service.auth.AuthService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AuthController {
    @Reference(version="${api.service.version}")
    AuthService authService;

    @GetMapping("/authAccessToken")
    public AccountInfo authAccessToken(@RequestParam("tokenCode") String tokenCode){
        //校验解码
        return authService.authorize(tokenCode);
    }
}
